package main

import "fmt"
//单层循环冒泡排序
func main() {
	arr1 := [...]int{10, 4, 23, 12, 55, 23}
	fmt.Println(arr1, len(arr1))
	for i := 0; i < len(arr1)-1; i++ {
		if arr1[i] > arr1[i+1] {
			arr1[i],arr1[i+1] = arr1[i+1],arr1[i]
		} else {
			continue
		}
		fmt.Println(arr1)
	}
}
